package com.shrct.businessprocess.common.impl;

import com.shrct.businessprocess.common.CurrencyType;
import com.shrct.businessprocess.common.proxy.CurrencyTypeProxy;
import edu.fudan.langlab.domain.code.impl.CodeImpl;
import edu.fudan.mylang.pf.IObjectFactory;
import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;

@Entity
@DiscriminatorValue("CURRENCYTYPE_TYPE")
public class CurrencyTypeImpl extends CodeImpl implements CurrencyType {
  public CurrencyTypeImpl() {
    super();
  }
  
  public static CurrencyType create(final IObjectFactory objectFactory) {
    com.shrct.businessprocess.common.CurrencyType currencyType = new com.shrct.businessprocess.common.impl.CurrencyTypeImpl(
    );
    objectFactory.create(currencyType);
    return currencyType;			
    
  }
  
  public static CurrencyType createCurrencyTypeImpl(final IObjectFactory objectFactory, final Procedure1<CurrencyType> init) {
    com.shrct.businessprocess.common.CurrencyType currencyType = new com.shrct.businessprocess.common.impl.CurrencyTypeImpl(
    );
    objectFactory.create(currencyType);
    init.apply(currencyType);
    
    return currencyType;			
    
  }
  
  public CurrencyTypeProxy toProxy() {
    com.shrct.businessprocess.common.proxy.CurrencyTypeProxy proxy = new com.shrct.businessprocess.common.proxy.CurrencyTypeProxy();
    proxy.setId(this.getId());
    if(this instanceof edu.fudan.mylang.pf.INamedModelObject){
    	proxy.setName(((edu.fudan.mylang.pf.INamedModelObject)this).getEntityName());
    }
    return proxy;
    
  }
}
